Geometric Shapes
QuickDraw GX provides eight types of geometric shapes--the basic building blocks
of QuickDraw GX graphics. These shapes include empty shapes, full shapes, points, lines, rectangles, curves, polygons, and paths. You can use these shapes for drawing, for calculating areas, for clipping, as elements of more complex graphics, and so on.As with all types of QuickDraw GX shapes, a geometric shape is represented by a shape object in QuickDraw GX memory. However, what defines a geometric shape--what makes it different from other types of shapes--is how it uses the properties of the shape object:
Geometric shapes use all of the shape properties--to understand geometric shapes fully, you should be familiar with all of these properties, which are introduced in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects. The way that geometric shapes use these properties differently from other types of shapes is described in this book, particularly in the chapters "Geometric Shapes" and "Geometric Styles."
- The shape type property specifies the type of the geometric shape--empty, full, point, line, curve, rectangle, polygon, or path.
- The geometry property specifies the positions of the points that define the shape--for example, the end points of a line, or the corners of a rectangle.
- The shape fill property specifies how the geometry of the shape is interpreted--for example, as a framed outline or as a solid area.
- The style property references a style object, which specifies modifications to the geometric shape--for example, pen width, dashes, and patterns.
- The ink and transform properties reference an ink and a transform object. The ink object specifies the color and transfer mode applied to the shape when drawn. The transform object specifies mapping transformations made to the shape, how the shape is clipped, how the shape is hit-tested, and to what view ports the shape is finally drawn.
- The attributes, owner count, and tag list properties contain object-related information about the shape. These properties affect how the shape object is maintained in memory, when the memory held by the shape is freed, and other information you might want to specify for a particular shape.
Subtopics
- Geometric Shape Types
- Geometric Shape Geometries
- Geometric Shape Fills
- Geometric Styles, Inks, and Transforms
- Geometric Operations
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help